package com.quartet.utils.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum TypeCodeEnum {

    REGIST("256", "注册"),
    CANCEL("201", "取消"),
    LOGOUT("3", "注销");

    private final String value;
    private final String description;

    public static TypeCodeEnum find(String val) {
        for (TypeCodeEnum dataScopeEnum : TypeCodeEnum.values()) {
            if (val.equals(dataScopeEnum.getValue())) {
                return dataScopeEnum;
            }
        }
        return null;
    }
}
